package com.navinfo.platform.score.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 打分类型
 * @author machi
 * @create 2018/10/25
 **/
public enum ScoreTypeEnum {
    DAY("1"),
    WEEK("2"),
    MONTH("3"),
    ;

    private String type;

    ScoreTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
    public static ScoreTypeEnum getEnum(String type){
        for(ScoreTypeEnum soreTypeEnum : ScoreTypeEnum.values()){
            if(StringUtils.equals(type, soreTypeEnum.getType())){
                return soreTypeEnum;
            }
        }
        return null;
    }
}
